package com.atguigu.gmall.product.mapper;

import com.atguigu.gmall.model.product.SpuSaleAttr;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SpuSaleAttrMapper extends BaseMapper<SpuSaleAttr> {
    //根据spuId 查询销售属性及嵌套的属性值集合
    List<SpuSaleAttr> spuSaleAttrList(Long spuId);

    //4.根据商品ID 查询销售属性及销售属性值集合skuId,spuId
    //并且根据当前skuId库存ID查询出对应的销售属性值
    List<SpuSaleAttr> getSpuSaleAttrListCheckBySku(Long skuId, Long spuId);
}
